<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
  <!ENTITY copy "&#169;">
  <!ENTITY nbsp "&#160;">
  <!ENTITY laquo "&#171;">
  <!ENTITY raquo "&#187;">
]>
<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0">

  <xsl:include href="../list.xsl"/>

  <xsl:template match="/">
    <xsl:apply-templates />
  </xsl:template>

  <xsl:template match="content">
    <script type="text/javascript" src="/js/jquery-ui/jquery-ui-1.8.18.custom.min.js" />
    <script type="text/javascript" src="/js/region_cities.js" />
    <xsl:call-template name="Head-List"/>
    
    <div class="aside">
      <div class="head-slide on">
        Фільтр по ролям
      </div>
      <div class="container">
        <form action="/{$Controller}" method="post" class="filter">
          <fieldset>
            <ul class="editlist">
              <li>
                <label>  за ключовим словом</label>
                <input name="search_text" type="text" value="{$Form/search_text}" class="broad100"/>

              </li>

              <li>
                <label>  Роль користувача</label>
                <select name="role_id">
                  <option value="-1"> - Все - </option>
                  <xsl:for-each select="$Form/role_id/row">
                    <option value="{id}">
                      <xsl:if test="@active">
                        <xsl:attribute name="selected">selected</xsl:attribute>
                      </xsl:if>
                      <xsl:value-of select="name_full" />
                    </option>
                  </xsl:for-each>
                </select>
              </li>
              <li>
                <label>по активності</label>
                <select name="is_active">
                  <option value="-1"> - Все - </option>
                  <xsl:for-each select="$Form/is_active/row">
                    <option value="{id}">
                      <xsl:if test="@active">
                        <xsl:attribute name="selected">selected</xsl:attribute>
                      </xsl:if>
                      <xsl:value-of select="name" />
                    </option>
                  </xsl:for-each>
                </select>
              </li>
<li>
                <label>Область</label>

                <select name="id_region" id="id_region">
                  <xsl:if test="not($Form/id_region/row)">
                    <xsl:attribute name="disabled">disabled</xsl:attribute>
                  </xsl:if>
                  <option value="0">
                    Не задано
                  </option>
                  <xsl:for-each select="$Form/id_region/row">
                    <option value="{id}">
                      <xsl:if test="@active">
                        <xsl:attribute name="selected">selected</xsl:attribute>
                      </xsl:if>
                      <xsl:value-of select="name" /> (<xsl:value-of select="koatuu" />)
                    </option>
                  </xsl:for-each>
                </select>

              </li>

              <li>
                <label>Район</label>

                <select name="id_district" id="id_district">
                  <xsl:if test="not($Form/id_district/row)">
                    <xsl:attribute name="disabled">disabled</xsl:attribute>
                  </xsl:if>
                  <option value="0">
                    Не задано
                  </option>
                  <xsl:for-each select="$Form/id_district/row">
                    <option value="{id}">
                      <xsl:if test="@active">
                        <xsl:attribute name="selected">selected</xsl:attribute>
                      </xsl:if>
                      <xsl:value-of select="name" />
                    </option>
                  </xsl:for-each>
                </select>
              </li>

              <li hidden="true">
                <label>Місто</label>

                <select name="id_city" id="id_city">
                  <xsl:if test="not($Form/id_city/row)">
                    <xsl:attribute name="disabled">disabled</xsl:attribute>
                  </xsl:if>
                  <option value="0">
                    Не задано
                  </option>
                  <xsl:for-each select="$Form/id_city/row">
                    <option value="{id}">
                      <xsl:if test="@active">
                        <xsl:attribute name="selected">selected</xsl:attribute>
                      </xsl:if>
                      <xsl:value-of select="name" />
                    </option>
                  </xsl:for-each>
                </select>
              </li>
              <li class="submit">
                <input name="save" type="submit" id="save" style="font-weight: bold;" value="Застосувати" />
                <input name="reset" type="submit" id="reset" value="Показати все" />
              </li>
            </ul>
          </fieldset>
        </form>

      </div>
    </div>



    <div class="article">

      <xsl:apply-templates select="Main/List" />



    </div>


    <script type="text/javascript" src="/js/list_actions.js"></script>

  </xsl:template>
</xsl:stylesheet>